package testGroovy

import java.net.URI;

URI uri = new URI("file:///E:/work/apache-maven-3.2.3/conf/setting.xml")
println uri.path

long beginTime = System.currentTimeMillis()
10.times {
	println uri.path.split('/')[(uri.path.split('/').length-1)]
}
long endTime = System.currentTimeMillis()
println ((endTime - beginTime)/1000) + 's'

long beginTime1 = System.currentTimeMillis()
10.times {
	println uri.path.substring(uri.path.lastIndexOf('/')+1,uri.path.length())
}
long endTime2 = System.currentTimeMillis()
println ((endTime2 - beginTime1)/1000) + 's'

def file = uri.toURL().path as File
println file.exists()

